package com.wzy.alllearning.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;

import lombok.Data;

@Data
@TableName("user")
public class UserDO implements Serializable
{


	private static final long serialVersionUID = 8959331149113514081L;
	/**
	 * 用户信息
	 */
	private String username;

	private String password;

	private String email;

	private Integer age;

	private String phone;

	/**
	 * 系统主信息
	 */
	@TableId(type = IdType.AUTO)
	private Long id;

	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime created;

	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime modified;

	@TableField(fill = FieldFill.INSERT)
	private String creator;

	@TableField(fill = FieldFill.UPDATE)
	private String operator;

	// 逻辑删除
	// @TableLogic(value = "0", delval = "1")
	@TableField(fill = FieldFill.INSERT)
	private Integer status;

	@Version//更新操作添加乐观锁的操作
	@TableField(fill = FieldFill.INSERT)
	private Long version;
}
